Skip to content

test: improve test coverage for resourceManager#10344

Merged
joehan merged 6 commits intonextfrom
test/resourceManager
Apr 23, 2026
Merged

test: improve test coverage for resourceManager#10344
joehan merged 6 commits intonextfrom
test/resourceManager

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Apr 15, 2026

Description

Add unit tests for src/gcp/resourceManager.ts, specifically testing addServiceAccountToRoles and serviceAccountHasRoles.

Scenarios Tested

  • Validating success outcomes of role additions
  • Preventing duplicate role assignment

Sample Commands

npm run mocha -- 'src/gcp/resourceManager.spec.ts'

### Description
Add unit tests for src/gcp/resourceManager.ts, specifically testing addServiceAccountToRoles and serviceAccountHasRoles.

### Scenarios Tested
- Validating success outcomes of role additions
- Preventing duplicate role assignment

### Sample Commands
npm run mocha -- 'src/gcp/resourceManager.spec.ts'
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@joehan
Copy link
Copy Markdown
Member Author

joehan commented Apr 15, 2026

/gemini review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@joehan
Copy link
Copy Markdown
Member Author

joehan commented Apr 22, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new test suite for the resourceManager module, covering service account role management and verification. The tests utilize nock to mock Google Cloud Platform API responses. Feedback was provided regarding the use of type casting as an escape hatch in nock configurations, which violates the repository's TypeScript style guide.

Comment thread src/gcp/resourceManager.spec.ts Outdated
Comment thread src/gcp/resourceManager.spec.ts Outdated
Comment thread src/gcp/resourceManager.spec.ts Outdated
@joehan joehan requested a review from aalej April 22, 2026 21:07
Copy link
Copy Markdown
Contributor

@aalej aalej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! tests pass locally

@aalej
Copy link
Copy Markdown
Contributor

aalej commented Apr 23, 2026

I missed this, could you change the branch target to next?

@joehan joehan changed the base branch from main to next April 23, 2026 16:06
@joehan joehan merged commit 64d7380 into next Apr 23, 2026
47 checks passed
@joehan joehan deleted the test/resourceManager branch April 23, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants